<!-- 问卷 -->
<template>
	<view class="multiple-page">
		
	
		<view class="multiple-head">
			{{title}}
		</view>
		
		<view class="multiple-list" v-for="(item,index) in qInfo" :key="index">
			<view class="multiple-title" >
				{{index+1}}.{{item.title}}
			</view>
			<view class="multiple-option" v-for="(item2,index2) in item.option" :key="index2"
			v-if="item2.avatar==1">
				({{item2.value}})
			</view>
		
		</view>

	</view>
</template>

<script>

import { mapMutations, mapActions, mapState, mapGetters } from 'vuex';
export default {
	components: {
	},
	data() {
		return {
			id:0,
			title:'',
			type:0,
			num:1,
			qInfo:[],
		};
	},
	// 是否登录
	computed: {
		...mapGetters(['isLogin', 'authType']),
	},
	onLoad(e){
		let that = this;
		that.id=e.id;
		that.num=e.num;
		this.getQinfo();
	},
	methods: {
		// 检测
		checkActivity(data, type) {
			if (data) {
				return !data.includes(type);
			}
			return true;
		},
		// 路由跳转
		jump(path, parmas) {
			this.showShare = false;
			this.$Router.push({
				path: path,
				query: parmas
			});
		},
		// 回到首页
		goHome() {
			this.$Router.replaceAll('/pages/index/index');
		},

		// 选项卡
		onTab(id) {
			this.tabCurrent = id;
		},
		
		// 组件返回的type;
		changeType(e) {
			this.buyType = e;
		},
		// 组件返回的规格;
		getSkuText(e) {
			this.currentSkuText = e;
		},
		getQinfo(){
			let that = this;
			that.$http(
				'questionnaire.myQInfo', {
					id:that.id,
					num:that.num
				},
			).then(res => {
				that.qInfo=res.data.questionnaire;
				that.title=res.data.info.title;
			}).catch(e => {
				reject(e)
			});
		}
	}
};
</script>

<style lang="scss">
.multiple-page{
	position: relative;
	background-color:#bebebe;
	min-height: 100%;
	padding-top: 20rpx;
	padding-bottom: 70rpx;
	padding-left: 65rpx;
	padding-right: 65rpx;
}
.multiple-head{
	font-size: 42rpx;
	font-weight: bold;
	color: #444;
	margin-bottom: 37rpx;
}
.multiple-list{
	margin-bottom: 20rpx;
}
.multiple-title{
	font-size: 25rpx;
	color: #444;
	line-height: 48rpx;
}
.multiple-option{
	font-size: 25rpx;
	color: #444;
	line-height: 33rpx;
}

</style>
